package repository

import "sen-golang-study/go_game_study/hero_story_go_server/game_server/internal/domain/user/entity"

// UserRepository 用户仓储接口
type UserRepository interface {
	// GetByUserName 根据用户名获取用户
	GetByUserName(userName string) (*entity.User, error)

	// GetByUserID 根据用户ID获取用户
	GetByUserID(userID uint32) (*entity.User, error)

	// Save 保存用户
	Save(user *entity.User) error

	// Update 更新用户
	Update(user *entity.User) error

	// SaveOrUpdate 保存或更新用户
	SaveOrUpdate(user *entity.User) error

	// Delete 删除用户
	Delete(userID uint32) error

	// Exists 检查用户是否存在
	Exists(userName string) (bool, error)
}